1. Field of the Invention
The present invention relates to data recording and reproducing apparatuses, data recording and reproducing methods, and computer programs for recording and reproducing data on and from recording media, and more particularly, to data recording and reproducing apparatuses, data recording and reproducing methods, and computer programs for recording and reproducing data on and from write-once recording media such as DVD+R and DVD+R (DL) media.
More specifically, the present invention relates to a data recording and reproducing apparatus, a data recording and reproducing method, and a computer program for writing data onto recording media of a standard format in which no recording end position, i.e., last written address (LWA), is not defined in management information unique to the media, and more particularly, to a data recording and reproducing apparatus, a data recording and reproducing method, and a computer program for simplifying and accelerating a time-consuming process for searching for a recording start position using a recorded/unrecorded area management table for identifying a recorded or unrecorded area for each error-correcting-code (ECC) block having a predetermined size.
2. Description of the Related Art
Recently, disk-shaped recording media (hereinafter referred to as “optical disks”) using optical reading techniques, such as digital versatile disks (DVDs), have become increasingly prevalent for storage of a relatively large amount of files or a great number of files. Optical disks have large storage capacity, and are randomly accessible. Unlike contact magnetic recording media, optical disks do not suffer from wear or damage on a recording surface of the disks caused by a read operation, a disk head crash, etc. The surface of such disks is robust and faces low risk of accidental data loss.
Recording and reproducing apparatuses using optical disks have been widely used as, for example, external recording media for computers and external storage devices. With the recent increase in the recording capacity of disk-shaped recording media, disk camcorders of the type in which moving images are stored in disks instead of existing videotapes have become widespread (see, for example, Japanese Unexamined Patent Application Publication No. 2004-120364).
Currently, there are a plurality of existing DVD standards such as DVD-ROM, DVD-RW, and DVD-RAM. Examples of available write-once recording media include DVD-R, DVD-R (DL), DVD+R, and DVD+R (DL) (DL stands for Dual Layer, and dual layer disks have two recording layers and allow for dual-layer recording on the single side of the disks). The DVD-R format was specified by the DVD Forum, and the DVD+R format was standardized by a different organization named “DVD+RW Alliance”.
Like the CD-R standard, the DVD-R standard allows write-once recording on blank media. DVD-R media are made with organic dye recording layer materials and have the highest compatibility with DVD-ROM drives. The DVD+R standard, on the other hand, allows the recording of data in a manner similar to that in the DVD-ROM standard, and has higher reproduction compatibility than the DVD-R standard. The DVD+R standard is newer than the DVD-R standard, and DVD-R media are currently more prevalent. However, DVD+R media are more advantageous in terms of the DL structure, i.e., single-sided dual layer recording. For example, DVD+R (DL) compatible disk camcorders have become available.
In DVD+R and DVD+R (DL) media, unlike DVD-R and DVD-R (DL) media, a recording end position, i.e., last written address (LWA), is not defined in management information unique to the media. Therefore, a recording start position of a user-data zone, i.e., the last recording end position, is searched for each time data is written to a recording medium. A region including the last written ECC block is quickly searched for to speed up the access of the disk.
In DVD+R media, a recorded/unrecorded area management table called recorded area indicator (RAI) information can be used to manage recorded and unrecorded areas in the user-data zone. Specifically, the user-data zone is divided into partial areas each having 640 ECC blocks, and RAI information having four sectors is assigned to each of the partial areas. When recording is performed in a given partial area (if written data is found in a given partial area), the RAI information located at a position on the recorded/unrecorded area management table corresponding to the partial area is padded (see, for example, ECMA-349 Data Interchange on 120 mm and 80 mm Optical Disk using +R Format—Capacity: 4.7 and 1.46 Gbytes per Side (17.6.2 Recorded Area Indicators)).
Since RAI information indicates recorded areas only in units of 640 ECC blocks, it is difficult to identify up to which sector in 640 ECC blocks for which RAI information has been obtained recording has been completed. Therefore, the recorded/unrecorded area management table based on RAI information has a low granularity level at which to obtain the recording end position.
If the user-data zone is divided into a plurality of fragments, the recording end position is searched for each fragment. The size of the fragments is variable, and some fragments are long and others are short. For example, if RAI information corresponding to a boundary between two adjacent fragments indicates a recorded area, it is unknown whether recording has been completed in the previous divided area or recording has been completed in the subsequent divided area jumping over the boundary, resulting in a time-consuming process.
For example, if 640 ECC blocks of RAI information corresponding to the last recording position in a given fragment include a boundary with a fragment subsequent to the given fragment, the RAI information is padded. In this example, there may be cases in which, as shown in FIG. 14A, no writing has been performed in the subsequent fragment, and in which, as shown in FIG. 14B, writing has been performed in the subsequent fragment. Accordingly, even if the same RAI information is obtained, there can be a plurality of states of data written on the recording medium. Thus, it is difficult to specify a recording start position merely by referring to RAI information, and it is time-consuming to search for the last recording end position.
With the prevalence of optical disks, a wide variety of data types including audio data, video data, photograph data, and text data are recordable on media, and data may be recorded in units of not more than 640 ECC blocks. Since RAI information corresponds to the size of 640 ECC blocks, each fragment may have a size not more than 640 ECC blocks or a fragment having a size not less than 640 ECC blocks may also be contained. In such cases, a range of 640 ECC blocks indicated by RAI information may include a boundary between fragments. As shown in FIGS. 14A and 14B, a recording-start-position search process based on RAI information is therefore time-consuming.
If it takes a long time to search for a recording start position, it is difficult to start writing data immediately in response to the initial write command, resulting in failure in real-time data recording.
For example, Japanese Unexamined Patent Application Publication No. 2005-327406 discloses an information recording apparatus in which the size of partial areas assigned to RAIs is not fixed to 640 ECC blocks but is variable depending on the size of divided areas into which the user-data zone is divided to establish correspondences between the divided areas and the partial areas so that a boundary between a recorded divided area and an unrecorded divided area can be efficiently searched for. Although it is possible to easily identify whether each of the divided areas is an unrecorded or recorded area, there still remains the problem of low granularity level at which to acquire a recording end position in the divided areas.